home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_06
/
2n06018d
< prev
next >
Wrap
Text File
|
1991-04-28
|
432b
|
23 lines
#include <stdio.h>
#include "snooper.h"
static char buffer[BUFSIZ];
void called(int x)
{
/* Prints formatted string to file "debug.000" ... */
__BREAK(__FIL0__,d_printf("called(): arg = %d\n", x));
/* continue ..... */
}
void main(void)
{
int i;
fp = fopen("testfile", "r" );
fread(buffer,1,BUFSIZ,fp);
for( i = 0 ; i < BUFSIZ ; ++i ) {
called((int) buffer[i]);
}
}